package cn.sc.summer.calculate.form;

import cn.sc.summer.calculate.enums.TaskBehaviorEnum;
import cn.sc.summer.core.annotation.EnumValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 类名：操作定时任务表单
 *
 * @author a-xin
 * @date 2023/11/27 08:22
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "操作定时任务表单")
public class OperationTaskForm implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 任务ID
     */
    @ApiModelProperty(value = "任务ID")
    @NotBlank(message = "任务ID不能为空！")
    private String taskId;

    /**
     * 任务执行行为
     *
     * @see TaskBehaviorEnum
     */
    @ApiModelProperty(value = "任务执行行为", notes = "cn.sc.summer.calculate.enums.TaskBehaviorEnum")
    @NotBlank(message = "任务执行行为不能为空！")
    @EnumValid(message = "不存在对应的任务行为！", target = TaskBehaviorEnum.class)
    private String taskBehavior;

}
